import com.zwc.kotlin.coroutines.async
import com.zwc.kotlin.coroutines.delay
import com.zwc.kotlin.coroutines.scope.GlobalScope

suspend fun main() {
    println(1)
    val deferred = GlobalScope.async {
        println(3)
        getValue()
    }
    println(2)
    val result = deferred.await()
    println(result)
    println(4)
}

suspend fun getValue(): String {
    delay(5000L)
    return "HelloWorld"
}